home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / rexx / antique.rexx < prev    next >
OS/2 REXX Batch file  |  2005-07-11  |  1KB  |  54 lines

  1. /* Image Engineer ARexx macro script */
  2. /* by Simon Edwards                  */
  3. /* 11/7/95                           */
  4.  
  5. Options results
  6. signal on error            /* Setup a place for errors to go */
  7.  
  8. if arg()==0 then exit
  9.  
  10. 'PROJECT_INFO' arg(1) 'TYPE'
  11. if RESULT~='COLOUR' then do
  12.     'LOAD_PALETTE' arg(1) '"IE:Palettes/Grey256.palette"'
  13.     'CONVERT_TO_COLOUR' arg(1)
  14.     greycolour=RESULT
  15.     'CONTRAST' greycolour '-11 GREEN'
  16.         Project1=RESULT
  17.     CLOSE greycolour
  18. end
  19. else do
  20.     'CONTRAST' arg(1) '-11 GREEN'
  21.     Project1=RESULT
  22. end
  23.  
  24.  
  25. 'BRIGHTNESS' Project1 '-21 GREEN'
  26. Project2=RESULT
  27. CLOSE Project1
  28.  
  29. 'CONTRAST' Project2 '-24 BLUE'
  30. Project1=RESULT
  31. CLOSE Project2
  32. 'BRIGHTNESS' Project1 '-41 BLUE'
  33. CLOSE Project1
  34.  
  35. exit
  36.  
  37. /*******************************************************************/
  38. /* This is where control goes when an error code is returned by IE */
  39. /* It puts up a message saying what happened and on which line     */
  40. /*******************************************************************/
  41. error:
  42. if RC=5 then do            /* Did the user just cancel us? */
  43.     IE_TO_FRONT
  44.     LAST_ERROR
  45.     'REQUEST "'||RESULT||'"'
  46.     exit
  47. end
  48. else do
  49.     IE_TO_FRONT
  50.     LAST_ERROR
  51.     'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!'
  52.     exit
  53. end
  54.